package com.ruoyi.business.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.core.validate.Type1Group;
import com.ruoyi.common.core.validate.Type2Group;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import java.math.BigDecimal;

/**
 * 订单费用业务对象 order_fee
 *
 * @author ruoyi
 * @date 2024-04-20
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class OrderFeeBo extends BaseEntity {

    /**
     * 主键
     */
    private Long feeId;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 名称
     */
    private String name;

    /**
     * 价格
     */
    @Digits(integer = 8, fraction = 2, message = "订单价格超出最大金额", groups = {AddGroup.class, EditGroup.class,Type1Group.class, Type2Group.class})
    @DecimalMin(value = "0.01", message = "订单价格不能低于0.01元", groups = {AddGroup.class, EditGroup.class,Type1Group.class, Type2Group.class})
    private BigDecimal amount;

    /**
     * 备注
     */
    private String remark;


}
